package com.haiheng.voiceandbook.view;

import android.app.Activity;
import android.webkit.WebView;

import com.haiheng.voiceandbook.MyApplication;
import com.haiheng.voiceandbook.utils.Density;

/**
 * 此webView为了解决适配问题、在使用适配方案的项目中使用webView会density 复原，原因是由于 WebView 初始化的时候会还原 density 的值导致适配失效
 * Created by Administrator on 2018/11/10.
 */

public class MyWebView extends WebView {


    public MyWebView(Activity context) {
        super(context);
        Density.setDensity(MyApplication.Companion.getInstance(),context);

    }

    @Override
    public void setOverScrollMode(int mode) {
        super.setOverScrollMode(mode);

    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);

    }
}

